Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stomp: fix Unsubscribe race #139

Merged
merged 1 commit into from
Oct 24, 2024
Merged

Conversation

hdonnay
Copy link

@hdonnay hdonnay commented Aug 26, 2024

I think this is OK because the only point that wakes the sync.Cond is after closing the channel and updating the status member. There should be no way to close the channel before updating the status. If there were, this code would be racy again.

I think this is OK because the only point that wakes the `sync.Cond` is
_after_ closing the channel and updating the `status` member. There
should be no way to close the channel _before_ updating the status. If
there were, this code would be racy again.

Signed-off-by: Hank Donnay <[email protected]>
@worg worg merged commit 80a8c9f into go-stomp:master Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants